package aps

import glory.xxd.ConsumerUtil
import glory.xxd.Utils
import org.json.JSONObject

class ShowDoneLotController {

    def commentService

    def index() {

        def standardJSONForPDA = JSONObject.newInstance()
        standardJSONForPDA.put("code","200")

        def logUUID = params.logUUID?:Utils.getUUID()
        def json
        def xmlReturn = ConsumerUtil.getQueueMsg(logUUID,"jms.queue.EAP.REPLY.Client")
        if(xmlReturn){
            xmlReturn = xmlReturn[0]
            json = Utils.getJsonObjectByXML(xmlReturn,"Request/.Body")
            standardJSONForPDA.put("data",json)
        }else{
            standardJSONForPDA.put("code","-200")
            standardJSONForPDA.put("message","请求信息通信异常!")
        }
        render json
    }
}
